package com.ruoyi.infoPointVide.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.infoPointVide.mapper.InfoPointVideoMapper;
import com.ruoyi.infoPointVide.domain.InfoPointVideo;
import com.ruoyi.infoPointVide.service.IInfoPointVideoService;

/**
 * 视频主Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-12
 */
@Service
public class InfoPointVideoServiceImpl implements IInfoPointVideoService 
{
    @Autowired
    private InfoPointVideoMapper infoPointVideoMapper;

    /**
     * 查询视频主
     * 
     * @param id 视频主主键
     * @return 视频主
     */
    @Override
    public InfoPointVideo selectInfoPointVideoById(Long id)
    {
        return infoPointVideoMapper.selectInfoPointVideoById(id);
    }

    /**
     * 查询视频主列表
     * 
     * @param infoPointVideo 视频主
     * @return 视频主
     */
    @Override
    public List<InfoPointVideo> selectInfoPointVideoList(InfoPointVideo infoPointVideo)
    {
        return infoPointVideoMapper.selectInfoPointVideoList(infoPointVideo);
    }

    /**
     * 新增视频主
     * 
     * @param infoPointVideo 视频主
     * @return 结果
     */
    @Override
    public int insertInfoPointVideo(InfoPointVideo infoPointVideo)
    {
        infoPointVideo.setCreateTime(DateUtils.getNowDate());
        return infoPointVideoMapper.insertInfoPointVideo(infoPointVideo);
    }

    /**
     * 修改视频主
     * 
     * @param infoPointVideo 视频主
     * @return 结果
     */
    @Override
    public int updateInfoPointVideo(InfoPointVideo infoPointVideo)
    {
        return infoPointVideoMapper.updateInfoPointVideo(infoPointVideo);
    }

    /**
     * 批量删除视频主
     * 
     * @param ids 需要删除的视频主主键
     * @return 结果
     */
    @Override
    public int deleteInfoPointVideoByIds(Long[] ids)
    {
        return infoPointVideoMapper.deleteInfoPointVideoByIds(ids);
    }

    /**
     * 删除视频主信息
     * 
     * @param id 视频主主键
     * @return 结果
     */
    @Override
    public int deleteInfoPointVideoById(Long id)
    {
        return infoPointVideoMapper.deleteInfoPointVideoById(id);
    }
}
